<template>
	<view class="container" >
		<view class="status_bar">
			<view style="margin-left: 4%;" @tap="goBack()"><u-icon name="arrow-leftward" size='24' /></u-icon></view>
			<view style="margin-left: -50upx; font-weight: bold;">更多信息</view>
			<view></view>

		</view>
		<view class="shop-box">
			<view class="con-shop">
				<view style=" display: flex;">
					<view style="margin-top: 10upx;">共同群聊</view>
				</view>
				<view>
					<span>{{list.commentQun}}</span>
					<uni-icons type="arrowright" size="18" color="#eaeaea"></uni-icons>
				</view>
			</view>
			<view class="con-shop">
				<view style="display: flex;">
					<view style="margin-top: 10upx;">共同圈子</view>
				</view>
				<view>
					<span>{{list.commonCircle}}</span>
					<uni-icons type="arrowright" size="18" color="#eaeaea"></uni-icons>
				</view>
			</view>
			<view class="con-shop">
				<view style="display: flex;">
					<view style="margin-top: 10upx;">共同好友</view>
				</view>
				<view>
					<span>{{list.commonFriends}}</span>
					<uni-icons type="arrowright" size="18" color="#eaeaea"></uni-icons>
				</view>
			</view>
		</view>
		<view class="shop-box">
			<view class="con-shop">
				<view style="display: flex;">
					<view style="margin-top: 10upx;">性别</view>

				</view>
				<view v-if="info.user_sex==0">女</view>
				<view v-if="info.user_sex==1">男</view>
			</view>
			<view class="con-shop" @tap="toPage(`/pages/contacts/setRemark?type=5`)">
				<view style="display: flex;">

					<view style="margin-top: 10upx;">个性签名</view>
					<view style="margin-top: 5px;margin-left: 10px;">{{info.userDesc}}</view>
				</view>
			</view>
			<view class="con-shop">
				<view style="display: flex;">
					<view style="margin-top: 10upx;">朋友来源</view>
				</view>
				<!-- <view>
					{{list.}}
				</view> -->
				<view>
					通过账号搜索
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userId: uni.getStorageSync('user_uid') || '',
				startX: 0, // 触摸开始的X坐标
				endX: 0, // 触摸结束的X坐标
				threshold: 50, // 设置滑动多少距离后触发返回
				value2: true,
				user: {},
				list: "",
				info: ''
			}
		},
		onLoad(option) {
			this.info = JSON.parse(option.groupId)
			console.log(this.info)
			this.getin()
		},
		onShow() {

			//// this.getList()

		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				});
			},
			getin() {
				uni.request({
					url: this.$api.baseUrl + '/api/user/friend/message',
					header: {
						'content-type': 'application/json'
					},
					data: {

						my_user_id: uni.getStorageSync('user_uid'),
						friend_user_id: this.info.user_uid
					},
					method: 'POST',
					success: res => {
						this.list = res.data.data
						console.log(this.list.共同好友个数);
					},
					fail: res => {
						console.log(res);
					}

				})
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	page {
		overflow: hidden;
	}

	.container {
		width: 100%;
		height: 100%;
		background: #f4f7fc;
	}

	.status_bar {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 90upx;
		background: #fff;
	}

	.status_bar,
	.head {
		background-color: #fff;
		height: 160upx;
		padding-bottom: 60upx;

		.face {
			width: 160upx;
			height: 160upx;
			border-radius: 10upx;
		}

		.info-name {
			font-size: 40upx;
			font-weight: bold;
		}

		.info-num {
			padding: 2upx 0upx;
			border-radius: 30upx;
			margin-top: 21upx;
			color: #5d5d5d;
		}

		.copybtns {
			color: #4457a4;
			margin-top: 21upx;
		}

		.info-box {
			margin-left: 30upx;
		}
	}

	.shop-box {
		background-color: #fff;
		padding: 0upx 40upx;
		color: #2e2e2e;
		font-weight: 300;
		//margin-top: 14upx;
		margin-bottom: 14upx;

		.con-shop {
			height: 100upx;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
	}

	// .chat-btn {
	// 	background-color: #fff;
	// 	text-align: center;
	// 	color: #2f6dc2;
	// 	font-weight: 300;
	// 	padding: 36upx;
	// 	border-bottom: solid 1px #f0f0f0;
	// }
</style>